<template>
  <view class="dot-main">
    <view
      :class="['dot-item',current==index?'active':'']"
      v-for="(item,index) in list"
      :key="index"
    ></view>
  </view>
</template>

<script lang="ts">
import Vue from "vue";
export default Vue.extend({
  props: ["list", "current"],
  data() {
    return {};
  },
  onLoad() {},
  methods: {}
});
</script>

<style lang="scss">
  .dot-main {
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
  }
  .dot-item {
    width: 7upx;
    height: 7upx;
    border-radius: 50%;
    margin: 0 6upx;
    box-sizing: border-box;
    background: #FFF;
    opacity: 0.8;
  }
  .active {
    width: 20upx;
    opacity: 1;
    border-radius: 30%;
  }
</style>
